fspc(opt->log,"debug"); fprintf(opt->log,"Warning link followed against robots.txt: link %s at %s%s"LF,l,adr,fil);
test_flush;
}
}
}
if (r == -1) { // interdire
forbidden_url=1;
question=0;
if ((opt->debug>1) && (opt->log!=NULL)) {
fspc(opt->log,"debug"); fprintf(opt->log,"(robots.txt) forbidden link: link %s at %s%s"LF,l,adr,fil);
test_flush;
}
}
}
}
if (!question) {
if ((opt->debug>1) && (opt->log!=NULL)) {
if (!forbidden_url) {
fspc(opt->log,"debug"); fprintf(opt->log,"(wizard) shared foreign domain link: link %s at %s%s"LF,l,urladr,urlfil);
} else {
fspc(opt->log,"debug"); fprintf(opt->log,"(wizard) cancelled foreign domain link: link %s at %s%s"LF,l,urladr,urlfil);
}
test_flush;
}
#if BDEBUG==3
printf("at %s in %s, wizard says: url %s ",urladr,urlfil,l);
if (forbidden_url) printf("cancelled"); else printf(">SHARED<");
printf("\n");
#endif
}
/* en cas de question, ou lien primaire (enregistrer autorisations) */
if (question || (ptr==0)) {
#if HTS_ANALYSTE
char* s;
#else
char s[4];
#endif
int n=0;
// si primaire (plus bas) alors ...
if ((ptr!=0) && (force_mirror==0)) {
HTS_REQUEST_START;
HT_PRINT("\n");
HT_PRINT("At "); HT_PRINT(urladr); HT_PRINT(", there is a link ("); HT_PRINT(adr); HT_PRINT("/"); HT_PRINT(fil); HT_PRINT(") which goes outside the address."LF);
HT_PRINT("What should I do? (press a key + enter)"LF LF);
HT_PRINT("* Ignore all further links" LF);
HT_PRINT("0 Ignore this link (default if empty entry)"LF);
HT_PRINT("1 Ignore directory and lower structures"LF);
HT_PRINT("2 Ignore all domain"LF);
//HT_PRINT("3 (Ignore location, not implemented)\n");
HT_PRINT(LF);
HT_PRINT("4 Get only this page/link"LF);
HT_PRINT("5 Mirror this link (useful)"LF);
HT_PRINT("6 Mirror links located in the same domain"LF);
HT_PRINT(LF);
//#if HTS_ANALYSTE!=2
//HT_PRINT("! View extract of html code where the link is located"LF);
//#endif
HTS_REQUEST_END;
#if HTS_ANALYSTE
{
char BIGSTK tempo[HTS_URLMAXSIZE*2];
tempo[0]='\0';
strcatbuff(tempo,adr);
strcatbuff(tempo,"/");
strcatbuff(tempo,fil);
s=hts_htmlcheck_query3(tempo);
}
#else
do {
io_flush; linput(stdin,s,2);
#endif
if (strnotempty(s)==0) // entrΘe
n=0;
else if (isdigit((unsigned char)*s))
sscanf(s,"%d",&n);
else {
switch(*s) {
case '*': n=-1; break;
case '!': n=-999; {
/*char *a;
int i;
a=copie_de_adr-128;
if (a<r.adr) a=r.adr;
for(i=0;i<256;i++) {
if (a==copie_de_adr) printf("\nHERE:\n");
printf("%c",*a++);
}
printf("\n\n");
*/
}
break;
default: n=-999; printf("What did you say?\n"); break;